IMAGE_NAME = sacs/cargo_data_sync
IMAGE_VERSION = 1.0.0_dev8
IMAGE_REPOSITORY = registry.cn-shenzhen.aliyuncs.com

run:
	go run cmd/cmd.go

build:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o data_sync  cmd/cmd.go

image:
	make build
	docker build -t ${IMAGE_REPOSITORY}/${IMAGE_NAME}:${IMAGE_VERSION} .
	rm data_sync
push:
	docker push ${IMAGE_REPOSITORY}/${IMAGE_NAME}:${IMAGE_VERSION}

clean:
	docker rmi -f $$(docker images | grep ${IMAGE_NAME} | awk '{print $$3}') || true

